package com.photovoltaic.auth.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

@Data
@TableName("role")
public class Role {

    @TableId(type = IdType.AUTO)
    private Long id;
    
    private String name;

    private String description;

    private Date createTime;

    private Date updateTime;
    
    /**
     * 获取角色名称
     * 为了兼容控制器中的代码
     * @return 角色名称
     */
    public String getRoleName() {
        return name;
    }
} 